From 1de7bed3d11cd5521f84340aa65ed4b9d883f626 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Vesel=C3=BD?= Date: Thu, 6 Dec 2018 15:34:51 -0500 Subject: [PATCH] meson: Add with-lcms option Signed-off-by: Jan Vesely --- babl/meson.build | 2 +- meson.build | 9 +++++++++ meson_options.txt | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/babl/meson.build b/babl/meson.build index 77e69a5..240493c 100644 --- a/babl/meson.build +++ b/babl/meson.build @@ -130,7 +130,7 @@ babl = library( cpp_args: [ '-DLIBDIR="' + join_paths(get_option('prefix'), get_option('libdir')) + '"', ], link_whole: [ babl_base, ], link_args: [ babl_link_args, ], - dependencies: [ math, thread, dl, ], + dependencies: [ math, thread, dl, lcms, ], link_depends: [ version_script_target, ], version: so_version, install: true, diff --git a/meson.build b/meson.build index 57a2b9b..f617f15 100644 --- a/meson.build +++ b/meson.build @@ -267,6 +267,15 @@ endif ################################################################################ # Dependencies +# LCMS +with_lcms = get_option('with-lcms') +if with_lcms + lcms = cc.find_library('lcms2', required : true) + if lcms.found() + conf.set('HAVE_LCMS', 1, description: 'Define to 1 if liblcms2 is available') + endif +endif + math = cc.find_library('m', required: false) log = cc.find_library('log', required: false) if platform_win32 diff --git a/meson_options.txt b/meson_options.txt index b2dcc54..ab08ce9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -5,3 +5,4 @@ option('enable-sse3', type: 'boolean', value: true, description: 'enable SSE3 option('enable-sse4_1', type: 'boolean', value: true, description: 'enable SSE4.1 support') option('enable-f16c', type: 'boolean', value: true, description: 'enable hardware half-float support') option('with-docs', type: 'boolean', value: true, description: 'build website') +option('with-lcms', type: 'boolean', value: true, description: 'build with lcms') -- 2.30.2